DEFINITION FOR C MODULE Errno ;

(*----------------------------------------------------------------------*)
(*									*)
(*			    DICE error numbers				*)
(*		        		    				*)
(*----------------------------------------------------------------------*)

CONST
  EDOM	    = 1 ;
  ERANGE    = 2	;
  EBADF	    = 3	;	(*  bad file descriptor			*)
  ENOPERM   = 4	;	(*  write on ro or read on wo desc	*)
  ENOMEM    = 5	;	(*  no memory ???			*)
  ENOFILE   = 6	;	(*  open failed				*)
  ENOENT    = 6	;	(*  ... synonym?			*)

  EACCES    = 7	;	(*  access disallowed			*)
  EINVAL    = 8	;	(*  invalid flags			*)
  EMFILE    = 9	;	(*  ran out of FDs			*)
  EAGAIN    = 10 ;
  EPEER	    = 11 ;
  EPIPE	    = 12 ;
  ENOTFND   = 13 ;
  ESTACK    = 14 ;	(*  ran out of stack			*)

  ENOTTY    = 15 ;
  ENXIO	    = 16 ;	(*  lattice compat?			*)
  EEXIST    = 17 ;	(*  already exists			*)

  EWOULDBLOCK = 18 ;	(*  call would block			*)
  EINTR	      = 19 ;	(*  interrupted call			*)

VAR
  errno : LONGINT ;

END Errno.

